package com.google.code.sysarch.v2;

public class Santa extends Thread {
	
	private boolean initialize = true;
	
	/**
	 * makes sure that Santa starts sleeping
	 */
	Santa() {
		this.initialize = true;
	}

	/**
	 * creates the one and only Santa Claus
	 */	
	public void run() {
		if (this.initialize == true) {
			/*
			 * start sleeping
			 */
			this.initialize = false;
			synchronized (this) {
				try {
					this.wait();
				} catch (InterruptedException e) {}
			}
		}
	}
	
}
